package jjn.acwing.java_basic;

import java.util.Scanner;

/**
 * @author Jjn
 * @since 2023/8/19 11:10
 */
public class Acwing663 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int first = scanner.nextInt();
        int second = scanner.nextInt();
        int third = scanner.nextInt();
        int sum = first + second + third;
        int max = Math.max(first, Math.max(second, third));
        int min = Math.min(first, Math.min(second, third));
        System.out.printf("%d\n%d\n%d\n\n", min, sum - min - max, max);
        System.out.printf("%d\n%d\n%d\n", first, second, third);
    }
}
